package com.example.test_app.Util;

public class DarkModeManager {

    public static int NORMAL_MODE = 0;
    public static int DARK_MODE = 1;

    public static void saveDarkMode(int mode) {
        SpUtil.get("dark_mode").saveData("dark", mode);
    }

    public static boolean isDarkMode() {
        SpUtil s = (SpUtil) SpUtil.get("dark_mode");
        if (s == null) {

            return false;
        }
        if (SpUtil.get("dark_mode").readInt("dark", NORMAL_MODE) == DARK_MODE) {
            return true;
        } else {
            return false;
        }
    }

}